home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / hdf / unix / examples.lha / examples / ann / ann.test < prev    next >
Encoding:
Text File  |  1991-10-08  |  2.3 KB  |  102 lines

  1. #! /bin/csh -f
  2. # Script for testing annotation routines 
  3. #
  4. # Output files can also be examined with hdfed to see if labels
  5. # and descriptions are there.
  6. #
  7. # Test routines:
  8. #
  9. #   putSDS_RISan <outfile> <height> <width> <reps>:  writes a file
  10. #       containingg some number (<reps>) of SDSs and images.  The
  11. #       dimensions of the images are all <height>x<width>.
  12. #       Two out of every three SDSs are given annotations, but
  13. #       all RISs are given annotations.
  14. #
  15. #   getSDSan <infile>: prints all of the annotations for all of
  16. #       of the SDSs in <infile>.
  17. #
  18. #   get1anF: FORTRAN version. Gets only second label and description. 
  19. #       Enter filename after prompt.
  20. #
  21. #   getSDSlablist <infile>: gets SDS label list for <infile>
  22. #   getSDSlablistF: FORTRAN version.  Enter filename after prompt.
  23. #   file_ann_test <file>: writes *file* annotations to a file and 
  24. #       then reads them back.
  25. #   file_ann_test: FORTRAN version.  Enter filename after prompt.
  26. #
  27. #
  28. set echo
  29. #
  30. # write to file o1 one SDS and one RIS, with annotations
  31. putSDS_RISan o1 30 40 1
  32. #
  33. # ---------------------------
  34. #
  35. # write to file o2 10 of each
  36. putSDS_RISan o2 30 40 10
  37. #
  38. # ---------------------------
  39. #
  40. # print all SDS annotations stored in o1
  41. getSDSan o1
  42. #
  43. # ---------------------------
  44. #
  45. # print all SDS annotations stored in o2
  46. getSDSan o2
  47. #
  48. # ---------------------------
  49. #
  50. # by using DFANlablist, get and print all SDS labels stored in o1
  51. getSDSlblst o1
  52. #
  53. # ---------------------------
  54. #
  55. # by using DFANlablist, get and print all SDS labels stored in o1
  56. getSDSlblst o2
  57. #
  58. # ---------------------------
  59. #
  60. # write file labels and file descriptions to file o3 and read them back
  61. file_ann o3
  62. #
  63. # ---------------------------
  64. #
  65. # *********************  NOW FOR THE FORTRAN TESTS *******************
  66. #
  67. unset echo
  68. echo " "
  69. echo "NOW THE FORTRAN TESTS...enter o2 or 'o2' when prompted for a file name"
  70. echo " "
  71. set echo
  72. #
  73. # print all SDS annotations stored in the file the user names
  74. echo " "
  75. echo "get1anF"
  76. echo " "
  77. get1anF
  78. #
  79. # ---------------------------
  80. #
  81. # get and print all SDS labels stored in the file the user names
  82. echo " "
  83. echo "getSDSlblstF"
  84. echo " "
  85. getSDSlblstF
  86. #
  87. # ---------------------------
  88. #
  89. # write file labels and file descriptions to file o4 and read them back
  90. echo " "
  91. echo "file_annF"
  92. echo " "
  93. file_annF
  94. #
  95. # ---------------------------
  96. #
  97. unset echo
  98.  
  99.  
  100.  
  101.